<?php

namespace addons\comments\model;

use app\admin\model\user\User;
use app\common\traits\ModelCurd;
use app\post\model\Post;
use think\Model;

class CommentsPostModel extends Model
{
    use ModelCurd;
    protected $table = 'cp_comments';
    protected $autoWriteTimestamp = true;

    public function user()
    {
        return $this->belongsTo(User::class,"from_uid");
    }

    public function article()
    {
        return $this->belongsTo(Post::class,'topic_id');
    }


}